package com.szy.redstonemcu;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;

public class RM8FAA_ContainerGUI extends GuiContainer {
    public static final int WIDTH = 176;
    public static final int HEIGHT = 133;
    private GuiTextField field;

    private static final ResourceLocation background = new ResourceLocation(RedstoneMCU.MODID, "textures/gui/mbe30_inventory_basic_bg.png");
    private McuBaseEntity te;
    public RM8FAA_ContainerGUI(InventoryPlayer invPlayer, McuBaseEntity tileEntity) {
        super(new RM8FAA_Container(invPlayer,tileEntity));
        this.te=tileEntity;
        xSize = WIDTH;
        ySize = HEIGHT;
    }

    @Override
    protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
        Minecraft.getMinecraft().getTextureManager().bindTexture(background);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
    }

    @Override
    protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
        super.drawGuiContainerForegroundLayer(mouseX, mouseY);
        buttonList.clear();

        addButton(new BuildButton(2,guiLeft+150,guiTop+5,36,18,"compile",te));
        addButton(new ResetButton(3,guiLeft+100,guiTop+5,36,18,"reset&run",te));

        //field=new GuiTextField(3, this.fontRenderer, 50, 50, 300, 20);
        //field.setText("1234456");
    }
}